from application import app
from flask import render_template
from common.libs.logservice import LogService


@app.errorhandler(404)
def error_404(e):
    LogService.addErrorlog(str(e))  # 错误内容
    context = {"msg": "温馨提醒您访问的页面不存在~",
               "status": 404
               }
    return render_template("error/error.html", **context)
